<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //         0123
        var str = '1Aabcdefg';

        // 1. charAt(index)   str[index]
        console.log(str.charAt(1), str[1]);

        // 2. concat(str2) 拼接字符串
        console.log(str.concat('123','456'));

        // 3. includes() boolean 
        console.log(str.includes('z'));

        // 4. substring(startIndex, endIndex)    [startIndex, endIndex)
        //    同 slice
        console.log(str.substring(1,3));

        // 5. toLowercase()/toUpperCase()
        
        console.log('ABCDEFG'.toLowerCase());
        console.log('zyx'.toUpperCase());

        // 6. chatCodeAt(index) 获取索引位置的字符的ASCII码
        console.log(str.charCodeAt(0));

        // 7. slice 、split、match、replace、search

    </script>
</body>
</html>